<!--继承模板-->
{% extends 'layout.html' %}

<!--重写模块-->
{% block main%}
<script type="text/javascript" charset="utf-8" src="/public/ueditor/ueditor.config.js"></script>  
<script type="text/javascript" charset="utf-8" src="/public/ueditor/ueditor.all.min.js"></script> 
<script type="text/javascript" charset="utf-8" src="/public/ueditor/lang/zh-cn/zh-cn.js"></script>  

<ol class="breadcrumb">
    <li><a href="/admin">管理首页</a></li>
    <li><span>添加博文</span></a></li>
</ol>
<h3>博文添加</h3>
<form method="post">
    <div class="form-group">
        <label for="title">分类:</label>
        <select name="category" id="category" class="form-control">
            <!--<option value="">1</option>
            <option value="">2</option>
            <option value="">3</option>-->
            {% for categary in categories %}
                <option value="{{categary.id}}">{{categary.name}}</option>
            {% endfor %}
        </select>
    </div>

    <div class="form-group">
        <label for="title">博文标题:</label>
        <input type="text" class="form-control" id="title" placeholder="请输入博文标题" name="title">
    </div>

    <div class="form-group">
        <label for="description">博文简介:</label>
        <textarea name="description"  class="form-control" rows="6" id="description" placeholder="请输入内容简介"></textarea>
    </div>
    <div class="form-group">
        <label for="description">博文内容:</label>
    </div>
     <div class="form-group">
        <label for="content">博文内容:</label>
        <textarea name="content"  class="form-control" rows="10" id="content" placeholder="请输入内容"></textarea>
    </div>
    <!-- <script id="content" name="content" type="text/plain" style="width:100%;height:500px;"></script>  
    <script type="text/javascript">  
        //实例化编辑器  
        //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例  
        var ue = UE.getEditor('content');  
    </script>   -->
   
    <button type="submit" class="btn btn-default">提交</button>
</form>

{% endblock %}

